import { get, post } from '@/utils/Http'
import Cookies from 'js-cookie'
import port from './port'
/**
 * @param {string} keyWord
 * @description 记录用户登录状态key
 */
const keyWord = 'tmp-token'
export function getTemplateData (id) {
    return post(port.avg.getTemplateData + id, { st: Cookies.get(keyWord) })
}
/** */
export function GetGiftData (id) {
    return post(port.avg.GetGiftData + id, { st: Cookies.get(keyWord) })
}
//满级奖励
export function GetFullGift (id) {
    return post(port.avg.GetFullGift + id, { st: Cookies.get(keyWord) })
}
//任务
export function GetTaskData (id) {
    return post(port.avg.GetTaskData + id, { st: Cookies.get(keyWord) })
}
//限定奖励
export function GetLimitedGift (id) {
    return post(port.avg.GetLimitedGift + id, { st: Cookies.get(keyWord) })
}
//领取奖励
export function RcvGloryGift ({ id, type, level }) {
    return post(port.avg.RcvGloryGift + id, { type: type, level: level, st: Cookies.get(keyWord) })
}
//全部领取
export function RcvAll (id) {
    return post(port.avg.RcvAll + id, { st: Cookies.get(keyWord) })
}
///任务领取
export function RcvTask ({ id, type, tid }) {
    return post(port.avg.RcvTask + id, { type: type, tid: tid, st: Cookies.get(keyWord) })
}
//进阶任务领取
export function RcvSelfTask ({ id, ty }) {
    return post(port.avg.RcvSelfTask + id, { ty: ty, st: Cookies.get(keyWord) })
}
//领取限定奖励
export function RcvLimitedGift ({ id, sort }) {
    return post(port.avg.RcvLimitedGift + id, { sort: sort, st: Cookies.get(keyWord) })
}
//领取免费通行证
export function RcvFreePrimaryPass ({ id }) {
    return get(port.avg.RcvFreePrimaryPass + id, { st: Cookies.get(keyWord) })
}
//商品购买
export function GetShop11Pay ({ id, amount, gid }) {
    return post(port.avg.GetShop11Pay + id, { amount: amount, id: gid, st: Cookies.get(keyWord) })
}
//限定奖励领取记录

export function LimitedHistory ({ id }) {
    return post(port.avg.LimitedHistory + id, { st: Cookies.get(keyWord) })
}
//购买记录
export function QueryHistory ({ id }) {
    return post(port.avg.QueryHistory + id, { st: Cookies.get(keyWord) })
}
//活动中心数据
export function GetAllActivity ({ mid }) {
    return get(port.avg.GetAllActivity, { mid: mid, st: Cookies.get(keyWord) })
}
///满级奖励领取
export function RcvFullGift ({ id, type }) {
    return post(port.avg.RcvFullGift + id, { type: type, st: Cookies.get(keyWord) })
}
//刷新任务
export function RefreshTask (id) {
    return post(port.avg.RefreshTask + id, { st: Cookies.get(keyWord) })
}
//满级奖励领取记录
export function GetLogFullLevel ({ id, page_index, page_size, tp }) {
    return post(port.avg.GetLogFullLevel + id, { page_index: page_index, page_size: page_size, tp: tp, st: Cookies.get(keyWord) })
}